/****** Object:  Table [dbo].[memberPayment]    ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[memberPayment](
	[memberPaymentId] [int] IDENTITY(1,1) NOT NULL,
	[bookingId] [int] NULL,
	[memberId] [int] NULL,
	[paymentPoints] [float] NULL,
 CONSTRAINT [PK_memberPayment] PRIMARY KEY CLUSTERED 
(
	[memberPaymentId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[memberPayment]  WITH CHECK ADD  CONSTRAINT [FK_memberPayment_booking] FOREIGN KEY([bookingId])
REFERENCES [dbo].[booking] ([bookingId])
GO

ALTER TABLE [dbo].[memberPayment] CHECK CONSTRAINT [FK_memberPayment_booking]
GO

ALTER TABLE [dbo].[memberPayment]  WITH CHECK ADD  CONSTRAINT [FK_memberPayment_memberPayment] FOREIGN KEY([memberId])
REFERENCES [dbo].[member] ([memberId])
GO

ALTER TABLE [dbo].[memberPayment] CHECK CONSTRAINT [FK_memberPayment_memberPayment]
GO

